PATCH Order
Request to update an allowed value for the order item. Supported operations:
The requests on this endpoint are processed asynchronously. After the patch operations are completed, the clients will receive a webhook notification indicating its success, in case this feature is being used.
Request
Endpoint
PATCH {clientId}/api/v2/orders/{clientOrderId}/orderItem/{orderItemId}
Headers
The PATCH Order API requires the following information in the headers of an HTTP request:
HTTP Header | Description |
---|---|
Authorization | The HTTP Authorization request header contains the credentials to authenticate a user agent with a server. |
Accept | The HTTP Accept request header contains information about the content types, expressed as MIME types, that the client can understand. The MIME type for the PATCH Order API request is application/json. |
Path parameters
Parameter | Description | Type | Required/Optional |
---|---|---|---|
clientId | The clientId is a unique code that is provided by LetsGetChecked. The clientId is used to identify a client, when a client calls the Orders and Results APIs. The code is formed by 1 to 4 alphanumeric characters. | string | Required |
clientOrderId | The Client Order ID is a unique code associated with the order ID in the client's system. When you use the Order API, the clientOrderId will be your reference for the order in the LetsGetChecked system. The maximum length is 100 characters. | string | Required |
orderItemId | The Order Item id returned in the GET Order Status, this is a unique code associated with the order item and it specifies what item from the order is to be updated | string | Required |
Body
The following table describes each item in the body of the request, the request body follows the standard PATCH Definition defined here:
Element | Description | Type | Required/Optional |
---|---|---|---|
patchOperation | Patch Operation object. | object(patchOp) | Required |
patchOp/op | Type of operation to be performed. Allowed values: replace . | string | Required |
patchOp/path | The path for the type of operation. Allowed values: /status/code . | string | Required |
patchOp/value | Value to update the order item to. Allowed values: Cancelled . | string | Required |
Sample request
Order Item Cancel
[
{ "op": "replace", "path": "/status/code", "value": "Cancelled" }
]
Status Codes
Status Code | Description |
---|---|
202 | Accepted. Requested action accepted |
400 | Bad Request |
401 | Unauthorized |
404 | NotFound |
422 | Unprocessable Entity. Order Item cannot be modified due to business rule validations |
415 | Unsupported media type. Payload in a unsupported format |
500 | Server Error |
503 | Server Error |
Sample Responses
202
Empty Body